home *** CD-ROM | disk | FTP | other *** search
- head 1.2;
- branch ;
- access ;
- symbols ;
- locks ; strict;
- comment @ * @;
-
-
- 1.2
- date 89.03.22.00.47.16; author rab; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 88.05.21.12.14.47; author ouster; state Exp;
- branches ;
- next ;
-
-
- desc
- @@
-
-
- 1.2
- log
- @*** empty log message ***
- @
- text
- @/*
- * labs.c --
- *
- * Contains the source code for the "labs" library procedure.
- *
- * Copyright 1988 Regents of the University of California
- * Permission to use, copy, modify, and distribute this
- * software and its documentation for any purpose and without
- * fee is hereby granted, provided that the above copyright
- * notice appear in all copies. The University of California
- * makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without
- * express or implied warranty.
- */
-
- #ifndef lint
- static char rcsid[] = "$Header: /sprite/src/lib/c/stdlib/RCS/labs.c,v 1.1 88/05/21 12:14:47 ouster Exp Locker: rab $ SPRITE (Berkeley)";
- #endif /* not lint */
-
- #include <stdlib.h>
-
- /*
- *----------------------------------------------------------------------
- *
- * labs --
- *
- * Compute the absolute value of an integer.
- *
- * Results:
- * The return value is j, unless j is negative, in which case
- * the return value is -j.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
- long
- labs(j)
- long j; /* Value to take the absolute value of. */
- {
- if (j < 0) {
- j = -j;
- }
- return j;
- }
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d17 2
- a18 2
- static char rcsid[] = "$Header: proto.c,v 1.2 88/03/11 08:39:08 ouster Exp $ SPRITE (Berkeley)";
- #endif not lint
- d20 2
- d39 1
- a39 1
- long int
- d41 1
- a41 1
- long int j; /* Value to take the absolute value of. */
- @
-